Skip to content

test(github-backup): reconcile previous-plan poison shapes end-to-end (#6831) - #8684

Merged
dezren39 merged 1 commit into
mainfrom
queue/11051-6831-reconcile-prev-plan
Nov 11, 2026
Merged

dezren39 merged 1 commit into
mainfrom
queue/11051-6831-reconcile-prev-plan

Conversation

@dezren39

@dezren39 dezren39 commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

Refs #6831

The code fix for #6831 already reached main through the sibling generated-state work: reconcile.main() loads the previous plan via ghb_common.load_plan, which runs validate_plan — per-entry shape validation with named problems — so the unguarded p["repo"] reads the issue probed (raw TypeError/KeyError/AttributeError aborting the sweep) are gone, on both the diff path and the #3229 retention path.

What was missing is the acceptance-required regression coverage driving reconcile.main() itself. test_plan_state_shape.py covers validate_plan as a unit, but nothing drove reconcile end-to-end with a poisoned previous plan. This PR adds infra/github-backup/tests/test_reconcile_old_plan_shape.py:

  • previous-plan entry 123, entry as string, entry missing repo, entry null, and a top-level object — each is named in the problems output and skipped; the sweep completes, rewrites plan.json, writes its dated report, and regenerates MANIFEST;
  • a mixed valid + poison plan: the valid entry still participates (counted in the removed diff);
  • a fully poisoned plan behaves as an empty previous plan;
  • {repo: 123} on the inventory-error retention path: the valid failed-owner entry is still retained, the poison entry is named and skipped.

Verification (local): the new file passes 40/40; test_reconcile_clone_pass.py 14/14, test_reconcile_retention.py 9/9, test_plan_state_shape.py OK. With this coverage in place, #6831's acceptance is fully met by current main plus this PR.


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

…#6831)

The code fix for #6831 already reached main through the sibling generated-state work: reconcile.main loads the previous plan via ghb_common.load_plan, which runs validate_plan (per-entry shape checks with named problems), so the unguarded p["repo"] reads the issue probed are gone. What was missing is the acceptance-required regression coverage driving reconcile.main() itself: previous-plan entry 123, entry as string, entry missing repo, entry null, a top-level object, a fully poisoned plan (behaves as empty: plan.json rewritten, dated report written, MANIFEST regenerated), a mixed valid+poison plan (valid entry still counted in the removed diff), and {repo: 123} on the #3229 inventory-error retention path (valid failed-owner entry still retained). 40/40 checks pass; test_reconcile_clone_pass.py (14/14), test_reconcile_retention.py (9/9) and test_plan_state_shape.py (OK) still pass.
@dezren39
dezren39 requested a review from a team as a code owner November 11, 2026 13:48
@coderabbitai

coderabbitai Bot commented Nov 11, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 21 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: dc0bd278-37db-46ec-9d91-85e4fee3b445
Commits

Reviewing files that changed from the base of the PR and between c04c45a and 18e34b0.

Files selected for processing: 1

  • infra/github-backup/tests/test_reconcile_old_plan_shape.py
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-11T13:50:15.580292Z 18e34b0 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant